package com.application.lucky.bean.jsonBean;


import com.application.lucky.config.Config;

/**
 * Created by zzz on 2019/5/17
 */
public class UiBean {
    public String id;
    public String avatarUrl;
    public boolean online;
    public String name;
    public int male;  // 1 是 male
    public int age;
    public int joinedType = 0;
    public String letters;
    private boolean wakeup;

    public String getLetters() {
        return letters;
    }

    public UiBean() {
    }

    public UiBean(String id) {
        this.id = id;
    }

    public UiBean(String id, String avatarUrl, boolean online, String name,
                  int male, int age, int joinedType) {
        this.id = id;
        this.avatarUrl = avatarUrl;
        this.online = online;
        this.name = name;
        this.male = male;
        this.age = age;
        this.joinedType = joinedType;
    }

    public boolean isWakeup() {
        return wakeup;
    }

    public void setWakeup(boolean is) {

        this.wakeup = is;

    }

    // 只要id和名字相同就认为是同一个
    @Override
    public int hashCode() {
        String result = name+id;
        return result.hashCode();
    }
    // 只要id和名字相同就认为是同一个
    @Override
    public boolean equals(Object obj) {
        UiBean u = (UiBean)obj;
        return this.id.equals(u.id) && (this.name.equals(u.name));
    }
}
